/* 
 * File:   csplit.h
 * Author: boyan
 *
 * Created on December 14, 2007, 1:28 PM
 */

#ifndef _CSPLIT_H
#define	_CSPLIT_H

#include "glodef.h"
#include "vecs.h"

#ifdef	__cplusplus
extern "C"
{
#endif

    int TimeStep_cs(void *cdata, vector u, scalar p,
        const vector u0, const scalar p0,
        const vector u1, const scalar p1,
        unsigned reassemble) __attribute__((warn_unused_result));
    void *InitCSplit(unsigned elemU, unsigned elemP);
    void DoneCSplit(void *cdata);

    void InitialPressure_cs(void* cdata, vector u0, vector ut0_bc,
        scalar p);
    void FinalAdjointPressure_cs(void* cdata, vector vT, vector uT,
        vector vtT_bc, vector f, scalar f_tested,
        scalar q);

    int TimeStep_adjoint_cs(void *cdata, vector v, scalar q,
        const vector v0, const scalar q0,
        const vector v1, const scalar q1,
        vector adv_u, vector u,
        vector f, vector vbc,
        int test_f) __attribute__((warn_unused_result));

#ifdef	__cplusplus
}
#endif

#endif	/* _CSPLIT_H */

